/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package edu.infomatik.tundra.logic;

import edu.infomatik.tundra.data.ILogicBean;
import edu.infomatik.tundra.logic.SprintMetrics;
import edu.infomatik.tundra.util.TundraConstants;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Sprint</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link edu.infomatik.tundra.SprintBean.impl.SprintImpl#getCapacitySP <em>Capacity SP</em>}</li>
 *   <li>{@link edu.infomatik.tundra.SprintBean.impl.SprintImpl#getTeamSize <em>Team Size</em>}</li>
 *   <li>{@link edu.infomatik.tundra.SprintBean.impl.SprintImpl#getImplements <em>Implements</em>}</li>
 *   <li>{@link edu.infomatik.tundra.SprintBean.impl.SprintImpl#getDuration <em>Duration</em>}</li>
 *   <li>{@link edu.infomatik.tundra.SprintBean.impl.SprintImpl#getMetrics <em>Metrics</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class SprintBean extends WorkBean implements ILogicBean{
	private final SprintMetrics DEFAULT_METRICS = SprintMetrics.HOURS;
	private SprintMetrics metrics=DEFAULT_METRICS;
	private double capacitySP;
	private int teamSize;
	private long duration;
	private long projectId;

	public SprintBean() {
		super();
		setKind(WorkKinds.SPRINT);
		setMetrics(SprintMetrics.HOURS);
	}

	public short getMetrics() {
		return (short)this.metrics.getValue();
	}

	public void setMetrics(short metrics) {
		if (null == (this.metrics=SprintMetrics.get(metrics)))
			this.metrics=SprintMetrics.OTHER;
	}

	public void setMetrics(SprintMetrics metrics) {
			this.metrics=metrics;
	}

	public double getCapacitySP() {
		return capacitySP;
	}


	public void setCapacitySP(double capacitySP) {
		this.capacitySP = capacitySP;
	}


	public int getTeamSize() {
		return teamSize;
	}


	public void setTeamSize(int teamSize) {
		this.teamSize = teamSize;
	}


	public long getDuration() {
		return duration;
	}


	public void setDuration(long duration) {
		this.duration = duration;
	}


	public long getProjectId() {
		return projectId;
	}


	public void setProjectId(long projectId) {
		this.projectId = projectId;
	}
	@Override
	public short getClassId() {
		return TundraConstants.SPRINT_CLASS;
	}
	
} //SprintImpl
